#ifndef GLOBALRESOURCE_H
#define GLOBALRESOURCE_H
#include <QMutex>
#include <QMutexLocker>
#include <QString>
#include <QPushButton>
#include <QDebug>
#include <QStringList>
#include <thread>
#include <QThread>

//#define Debug_Falg


enum ERROR_CODE
{
    NoError = 0,
    ErrorFileInvalid
};

class GlobalResource
{
public:
    GlobalResource();
    static GlobalResource* Instance()
    {

        QMutex mutex;
        QMutexLocker locker(&mutex);
        static GlobalResource all;//如果不是局部变量，可以去掉锁
        return &all;
    }

    static QString GetQssStr(QString strQssPath);


    static void SavePlaylist(QStringList& playList);    // 保存播放列表
    static void GetPlaylist(QStringList& playList);     // 获取播放列表
    static void SavePlayVolume(double& nVolume);        // 保存音量
    static void GetPlayVolume(double& nVolume);         // 获取音量

    static QString GetAppVersion();
};

//必须加以下内容,否则编译不能通过,为了兼容C和C99标准
#ifndef INT64_C
#define INT64_C
#define UINT64_C
#endif


//extern "C"{
//#include "libavutil/avstring.h"
//#include "libavutil/eval.h"
//#include "libavutil/mathematics.h"
//#include "libavutil/pixdesc.h"
//#include "libavutil/imgutils.h"
//#include "libavutil/dict.h"
//#include "libavutil/parseutils.h"
//#include "libavutil/samplefmt.h"
//#include "libavutil/avassert.h"
//#include "libavutil/time.h"
//#include "libavformat/avformat.h"
//#include "libavdevice/avdevice.h"
//#include "libswscale/swscale.h"
//#include "libavutil/opt.h"
//#include "libavcodec/avfft.h"
//#include "libswresample/swresample.h"
//#include "SDL.h"
//}



#define MAX_SLIDER_VALUE 65536

#endif // GLOBALRESOURCE_H
